package com.sprouting.ops.model;

import com.sprouting.ops.annotations.invoke.CheckIsNullOrEmpty;
import com.sprouting.ops.annotations.invoke.CheckLength;
import com.sprouting.ops.annotations.invoke.CheckNotNull;
import com.sprouting.ops.interfaces.AddGroup;
import com.sprouting.ops.interfaces.UpdGroup;
import lombok.Data;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.TableId;

import javax.validation.constraints.Null;

/**
 * (组件信息)表实体类
 *
 * @author longx
 * @since 2023-11-20 22:49:09
 */
@Data
@TableName("ops_component")
public class OpsComponent extends BaseModel {

    /**
     * 主键
     */
    @CheckNotNull(message = "非法ID", groups = UpdGroup.class)
    @CheckIsNullOrEmpty(message = "无效ID", groups = AddGroup.class)
    @TableId
    private String id;
    /**
     * 组件名称
     */
    @CheckLength(min = 1, max = 200, message = "组件名称超过长度限制")
    @CheckNotNull(message = "请输入组件名称")
    private String name;
    /**
     * 运行环境-win、linux
     * @see com.sprouting.ops.interfaces.ConstantBase.OsType
     */
    private String os;
    /**
     * 组件介绍
     */
    @CheckLength(min = 1, max = 1000, message = "组件介绍超过长度限制")
    @CheckNotNull(message = "请输入组件介绍")
    private String briefIntroduction;
    /**
     * 组件图标
     * @see DromaraFileStorage#getId()
     */
    private String ico;
    /**
     * 官网地址
     */
    @CheckLength(max = 1000, message = "官网地址超过长度限制")
    private String officialWebUrl;

}

